﻿namespace PerpetuumSoft.InstrumentationPDA
{
    using System;
    using System.Drawing;

    public class ColorSection
    {
        private System.Drawing.Color color;
        private decimal maximumPercent;

        public ColorSection()
        {
            this.color = System.Drawing.Color.Black;
            this.maximumPercent = 100M;
        }

        public ColorSection(System.Drawing.Color color, decimal maximumPercent)
        {
            this.color = System.Drawing.Color.Black;
            this.maximumPercent = 100M;
            this.color = color;
            this.maximumPercent = maximumPercent;
        }

        public override string ToString()
        {
            return (this.color.ToString() + " - " + this.maximumPercent.ToString() + "%");
        }

        public System.Drawing.Color Color
        {
            get
            {
                return this.color;
            }
            set
            {
                if (this.color != value)
                {
                    this.color = value;
                }
            }
        }

        public decimal MaximumPercent
        {
            get
            {
                return this.maximumPercent;
            }
            set
            {
                if (this.maximumPercent != value)
                {
                    this.maximumPercent = value;
                }
            }
        }
    }
}

